﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>意见反馈</title>
    <link rel="stylesheet" href="css/amazeui.css">
    <script src="js/vue.js"></script>
    <script src="js/jquery-3.2.1.min.js"></script>
    <script src="js/common.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
    <style>
        *{
            padding: 0;
            border:0;
            margin: 0;
        }
        .veads1_i1{
            display: block;
            float: left;
            margin-top: 2%;
            width: 2.5%;
        }
        .veads1_s1{
            display: block;
            text-align: center;
            font-size: 1.8rem;
        }
    </style>
</head>
<body>
    <div id="page1" v-cloak>

        <header data-am-widget="header" class="am-header am-header-default" style="background-color: #FFFFFF; border-bottom: 1px solid rgb(211, 211, 211);">
            <div class="am-header-left am-header-nav" onclick="goBack()">
                <a href="javascript:" class="">
                    <img class="am-header-icon-custom" src="images/veas07.png" alt="" />
                </a>
            </div>
            <h4 class="am-header-title" style=" color: black;">意见反馈</h4>
            <div class="am-header-right am-header-nav"><a href="/Wap/Index.html" class="am-header-icon am-icon-home" style="color: #A9A9A9; "></a></div>
        </header>
        <div class="am-g" style="margin-bottom: 4%">
            <div class="am-u-sm-12" style="color: #969696;    padding-top: 2%; padding-bottom: 2%;">
                我们懂得聆听，欢迎您留下宝贵的意见
            </div>
            <div class="am-u-sm-12" style="position: relative;">
                <textarea placeholder="请输入您的反馈意见" v-model="text" style='color: #969696; padding-left:2%;padding-top:1%;resize: none;height: 10rem;width: 100%;display: block; border: 1px solid #ededed;border-radius: 10px;' name='test'></textarea>
                <div class='text-right' style="position: absolute;right: 6.5%;bottom: 5%;">
                    <em style='color:red'>{{text.length}}</em>/<span>{{count}}</span>
                </div>
            </div>
        </div>
        <button type="button" class="am-btn am-btn-default am-radius" style="width: 90%;display: block;margin: 0 auto;background: #23c788;color: #fff;border-radius: 5px" v-on:click="tijiao()">提交</button>
    </div>
</body>
<script src="js/zishiying.js"></script>
<script>
var page=new Vue({
	el:'#page1',
	data:{
		text:'',
		count:200
	},
  methods:{
      tijiao:function () {
          var that=this;
          if(that.text.length<=0)
          {
            alert("请输入建议");
          }
          else
          {

            $.ajax({
                type: 'POST',
                url: apiUrl+'/Api/Mine/Feedback',
                data:{content:that.text},
                success: function (data) {
                    console.log(data);
                    if(data.errcode==0){
                        alert(data.errmsg);
                        location.href="usercenter.html";
                        //console.log(that.userinfo)
                    } else {
                        if (data.errcode == -2) {
                            $.weixinLogin();
                        } else {
                            alert(data.errmsg);
                        }
                    }
                },
                //error:function () {
                //    alert("服务器加载异常");
                //}
            })

          }
      }
  }
})
</script>
</html>
